package com.ruoyi.db.ums.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 搜索历史对象 ums_search_history
 *
 * @author ruoyi
 * @date 2020-04-26
 */

@ApiModel("搜索历史实体类")
@Data
@EqualsAndHashCode(callSuper=true)
public class UmsSearchHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("搜索历史ID")
    private Long id;

    @ApiModelProperty("用户ID")
    @Excel(name = "用户ID")
    @NotBlank(message = "用户ID不能为空")
    private Long userId;

    @ApiModelProperty("搜索关键字")
    @Excel(name = "搜索关键字")
    @NotBlank(message = "搜索关键字不能为空")
    @Size(min = 0, max = 63, message = "搜索关键字长度不能超过63个字符")
    private String keyword;

    @ApiModelProperty("搜索来源（0pc 1wx 2app）")
    @Excel(name = "搜索来源", readConverterExp = "0=pc,1=wx,2=app")
    @NotBlank(message = "搜索来源不能为空")
    @Size(min = 0, max = 63, message = "搜索来源长度不能超过63个字符")
    private String source;

    @ApiModelProperty("创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime addTime;

    @ApiModelProperty("逻辑删除")
    @Excel(name = "逻辑删除")
    private Integer deleted;

}
